home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / game / role / ldmud-3.2-bin.lha / mud / doc / efun / invert_bits < prev    next >
Text File  |  2001-04-06  |  543b  |  22 lines

  1. SYNOPSIS
  2.         string invert_bits (string str)
  3.  
  4. DESCRIPTION
  5.         Invert the status of all bits in bitstring <str> and return the
  6.         new string.
  7.  
  8.         Note that the total number of bits (ie the string length) stays
  9.         the same.
  10.  
  11. EXAMPLES
  12.         string s;
  13.  
  14.         s = set_bit("", 3); s = set_bit(s, 4); s = set_bit(s, 15);
  15.           --> s is now  "8 ("
  16.  
  17.         invert_bits(s) --> returns "G_W"
  18.  
  19. SEE ALSO
  20.         set_bit(E), clear_bit(E), test_bit(E), last_bit(E), and_bits(E),
  21.         or_bits(E), xor_bits(E), count_bits(E)
  22.